<style>
<!--
.rv_tdrow2 {
    background-color: #F8F8FB;
    padding: 3px;
}
.fieldbutton {
    background: url("<?php echo $this->webroot;?>img/post/timnangcao.jpg") no-repeat scroll 0 0 transparent;
    border: 0 none;
    color: #485460;
    cursor: pointer;
    font: bold 11px Tahoma,Arial,Verdana;
    height: 32px;
    padding-bottom: 2px;
    width: 113px;
}
td label {
	display: inline;
}
.breadcrumb {
	background: url("<?php echo $this->webroot;?>img/lam/home.gif") no-repeat scroll 0 2px transparent;
	border-bottom: 1px dotted #EEF3F8;
	color: #677889;
	font: bold 11px Tahoma,Arial;
	padding: 5px 0 5px 20px;
}
.breadcrumb a, .breadcrumb a:link, .breadcrumb a:active, .breadcrumb a:visited {
	color: #937D00;
	font: 11px Tahoma,Arial;
	text-decoration: underline;
}
-->
</style>
<div class="posts index">
	<div class="breadcrumb"><a title="Home" href="<?php echo $this->webroot?>posts">Trang chủ</a>&nbsp;»&nbsp;Tìm kiếm nâng cao</div>
	<div class="hdr-bg"> 
		<div style=" color: #4697F6; font: bold 17px Arial,san-serif;">&nbsp;<strong> TÌM KIẾM NÂNG CÁO </strong></div> 
		<div style="display: block; background-color: #6BA4E6; height: 3px; overflow: hidden;"></div>
	</div> 
	<br />
	<table class="tablebg_blue" cellspacing="10" cellpadding="0" border="0" width="100%"
		style="background-color: #F2F7FD; border: 1px solid #D6E8FD;">
		<?php echo $this->Form->create('', array('controller' => 'posts', 'action' => 'search_advance_result'));?>
		<tr>
			<td class = "contentbox">
				<table cellspacing="1" cellpadding="0" border="0" width="100%">
					<tr>
						<td class="rv_tdrow2" width="30%" style="background-color: #F8F8FB;padding: 3px;">Từ khóa:</td>
						<td class="rv_tdrow2" width="70%">
							
							<?php echo $this->Form->input('fkeyword', array('div' => false, 'label' => false, 'class' => 'fieldtext', 'size' => 60, 'style' => 'width: 300px; height: 22px; color: red; font-weight: bold'));?>
						</td>
					</tr>
					<tr>
						<td class="rv_tdrow2" width="30%">Tìm kiếm trên:</td>
						<td class="rv_tdrow2" width="70%">							
							<?php $options = array('tieude' => 'Tiêu đề', 'noidung' => 'Nội dung');?>
							<?php echo $this->Form->radio('ftype', $options, array('legend' => false, 'div' => false, 'value' => 'tieude'));?>
						</td>
					</tr>
					<tr>
						<td class="rv_tdrow2" width="30%">Loại tin:</td>
						<td class="rv_tdrow2" width="70%">
							<?php $ftypes = $this->requestAction('/types/get_all_types');?>
							<?php $mang = array('all'=>'- Tất cả -');?>
							<?php foreach($ftypes as $fcat):?>
							<?php $mang[$fcat['Type']['id']] = $fcat['Type']['name'];?>
							<?php endforeach;?>
							<?php $dselect = array('all' => '- Tất cả -', '1' => 'Bán', '2' => 'Mua');?>
							<?php echo $this->Form->input('fadstype', array('class' => 'fieldselect', 'style' => 'height: 20px;','options' => $mang, 'label' => false, 'div' => false));?>
						</td>
					</tr>
					<tr>
						<td class="rv_tdrow2" width="30%">Cách đây:</td>
						<td class="rv_tdrow2" width="70%">
							<?php $dselect = array('all' => '- Tất cả -', '7' => '7 ngày', '14' => 'Nửa tháng', '30' => 'Một tháng');?>
							<?php echo $this->Form->input('fadsday', array('class' => 'fieldselect', 'style' => 'height: 20px;','options' => $dselect, 'label' => false, 'div' => false));?>
						</td>
					</tr>					
					<tr>
						<td class="rv_tdrow2" width="30%">Danh mục tin:</td>
						<td class="rv_tdrow2" width="70%">
							<?php $fcats = $this->requestAction('/categories/category_menu_search');?>
							<?php $mang = array('all'=>'- Tất cả danh mục -');?>
							<?php foreach($fcats as $fcat):?>
							<?php $mang[$fcat['Category']['id']] = $fcat['Category']['name'];?>
							<?php endforeach;?>
							<?php echo $this->Form->input('fcat', array('class' => 'fieldselect','style' => 'height: 20px;','options' => $mang, 'label' => false, 'div' => false));?>
						</td>
					</tr>
					<tr>
						<td class="rv_tdrow2" width="30%">Tỉnh/Thành:</td>
						<td class="rv_tdrow2" width="70%">
							<?php $cities = $this->requestAction('/cities/get_all_cities'); $mang = null;?>
							<?php $mang = array('all'=>'- Tất cả -');?>
							<?php foreach($cities as $fcity):?>
							<?php $mang[$fcity['City']['id']] = $fcity['City']['name'];?>
							<?php endforeach;?>
							<?php echo $this->Form->input('fcity', array('class' => 'fieldselect','style' => 'height: 20px;','options' => $mang, 'label' => false, 'div' => false));?>
							
						</td>
					</tr>
					<tr>
						<td class="rv_tdrow2" width="30%">Sắp xếp theo:</td>
						<td class="rv_tdrow2" width="70%">
							<?php $mang = array('tieude' => 'Tiêu đề', 'solanxem' => 'Số lần xem', 'danhmuc' => 'Danh mục', 'ngaydang' => 'Ngày đăng');?>
							<?php echo $this->Form->input('forderby', array('class' => 'fieldselect','style' => 'height: 20px;','options' => $mang, 'label' => false, 'div' => false));?>
							
							Hiển thị: <?php echo $this->Form->select('fcount', array('20'=>'20', '30'=>'30', '50'=>'50'), 20, array('empty' => false));?> kết quả / 1 trang
						</td>
					</tr>
					<tr>
						<td class="rv_tdrow2" align="center" colspan="2" style="text-align: center">
							<input class="fieldbutton" type="submit" value="Tìm kiếm" name="submit">							
						</td>
					</tr>
				<?php echo $this->Form->End();?>
				</table>
			</td>
		</tr>
	</table>
	 <tr>
 </tr>
</div>